package SwingStudy;

import javax.swing.*;
import java.awt.*;

public class FirstSceneTest extends JFrame {
    //JPanel即流布局
    JPanel buttom = new JPanel(new FlowLayout(FlowLayout.CENTER, 120, 400));
    JButton Logup = new JButton("注册");
    JButton Login = new JButton("登录");
    JButton Exit = new JButton("退出");

    BorderLayout radioButtom = new BorderLayout();
    JRadioButton adminChoose = new JRadioButton("管理员");
    JRadioButton ownerChoose = new JRadioButton("业主");

    public FirstSceneTest() {
        super("CC小区物业管理系统 v1.0 beta1");

        Container contentPane = getContentPane();

        buttom.add(Logup);
        buttom.add(Login);
        buttom.add(Exit);

//        contentPane.add(adminChoose);
//        contentPane.add(ownerChoose);

        contentPane.add(buttom);

        //设置窗体图标
//        URL resource = FirstScene.class.getClassLoader().getResource("Icon.jpg");
//        Image image = new ImageIcon(resource).getImage();
//        setIconImage(image);
        Image icon = Toolkit.getDefaultToolkit().getImage("src/resource/Icon.jpg");
        this.setIconImage(icon);

        setSize(1000, 600);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);
    }

    public static void main(String[] args) {
        new FirstSceneTest();
    }
}

